package top.cwk.dubbo.web.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @ClassName InterceptorConfig
 * @Description 拦截/router/service请求
 * @Author 维康
 * @Date 2018/7/26 16:22
 * @Version 1.0
 **/
@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/comm/**");
        registry.addInterceptor(new RouterRequestInterceptor()).addPathPatterns("/router/service");
    }

}
